class TakeOutBean {
    int errcode;
    String errmsg;
    Res res;

    TakeOutBean({this.errcode, this.errmsg, this.res});

    factory TakeOutBean.fromJson(Map<String, dynamic> json) {
        return TakeOutBean(
            errcode: json['errcode'], 
            errmsg: json['errmsg'], 
            res: json['res'] != null ? Res.fromJson(json['res']) : null, 
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['errcode'] = this.errcode;
        data['errmsg'] = this.errmsg;
        if (this.res != null) {
            data['res'] = this.res.toJson();
        }
        return data;
    }
}

class Res {
    List<String> data;
    PageOptions pageOptions;

    Res({this.data, this.pageOptions});

    factory Res.fromJson(Map<String, dynamic> json) {
        return Res(
            data: json['data'] != null ? new List<String>.from(json['data']) : null, 
            pageOptions: json['pageOptions'] != null ? PageOptions.fromJson(json['pageOptions']) : null, 
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        if (this.data != null) {
            data['data'] = this.data;
        }
        if (this.pageOptions != null) {
            data['pageOptions'] = this.pageOptions.toJson();
        }
        return data;
    }
}

class PageOptions {
    String curPageClass;
    String currentPage;
    int perPage;
    bool showMorePage;
    bool showPreAndNextPage;
    int start;
    int to;
    int totalItems;

    PageOptions({this.curPageClass, this.currentPage, this.perPage, this.showMorePage, this.showPreAndNextPage, this.start, this.to, this.totalItems});

    factory PageOptions.fromJson(Map<String, dynamic> json) {
        return PageOptions(
            curPageClass: json['curPageClass'], 
            currentPage: json['currentPage'], 
            perPage: json['perPage'], 
            showMorePage: json['showMorePage'], 
            showPreAndNextPage: json['showPreAndNextPage'], 
            start: json['start'], 
            to: json['to'], 
            totalItems: json['totalItems'], 
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['curPageClass'] = this.curPageClass;
        data['currentPage'] = this.currentPage;
        data['perPage'] = this.perPage;
        data['showMorePage'] = this.showMorePage;
        data['showPreAndNextPage'] = this.showPreAndNextPage;
        data['start'] = this.start;
        data['to'] = this.to;
        data['totalItems'] = this.totalItems;
        return data;
    }
}